import request from '@/utils/request'

// 查询饲料列表
export function listFodder(query) {
  return request({
    url: '/dgw/fodder/list',
    method: 'get',
    params: query
  })
}

// 查询饲料详细
export function getFodder(id) {
  return request({
    url: '/dgw/fodder/' + id,
    method: 'get'
  })
}

// 新增饲料
export function addFodder(data) {
  return request({
    url: '/dgw/fodder',
    method: 'post',
    data: data
  })
}

// 修改饲料
export function updateFodder(data) {
  return request({
    url: '/dgw/fodder',
    method: 'put',
    data: data
  })
}

// 删除饲料
export function delFodder(id) {
  return request({
    url: '/dgw/fodder/' + id,
    method: 'delete'
  })
}

// 导出饲料
export function exportFodder(query) {
  return request({
    url: '/dgw/fodder/export',
    method: 'get',
    params: query
  })
}